<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>管理员登陆</title>
		<script src='js/jquery.js' type="text/javascript"></script>
		<script type="text/javascript">
			$(function(){
				$("#submit_button2").bind("click",login);
			});
			function login(){
				var params={
					email:$("#email2").val(),
					password:$("#password2").val()
				};
				//var p=$.parseJSON(params);
				//alert(p.email);
				$.getJSON("user/login.action", params, function(data){
					//alert(data);
					var s=$.parseJSON(data);

					if(s.result=='success'){
						//alert("删除成功！");
						$("#result_tip2").text(s.tip);
						setTimeout("$('#result_tip2').text('')",1000);
						location.href="article/toAddArticle.action?cid=23";
					}else{
						$("#result_tip").text(s.tip);
						setTimeout("$('#result_tip2').text('')",1000);
					}
				});
				
				return false;
			}
		</script>
	</head>
	<body>
		<h1>服务平台登录</h1>
			<table class="table_item">
				<tbody>
					<tr>
						<th>
						</th>
						<td class="form_tip" colspan="2" style="height:35px;">
							<span id="result_tip2"></span>
						</td>
					</tr>
					<tr>
						<th>
							Email：
						</th>
						<td>
							<input type="text" id="email2" class="input_short" value="sjjx@ustb.edu.cn">
						</td>
						<td class="form_tip">
						</td>
					</tr>
					<tr>
						<th>
							密码：
						</th>
						<td>
							<input type="password" id="password2" class="input_short" value="sjjxsjjx">
						</td>
						<td class="form_tip">
						</td>
					</tr>
					<tr>
						<th>
						</th>
						<td>
							<input type="submit" value="登    录" id="submit_button2">
						</td>
						<td>
						</td>
					</tr>
				</tbody>
			</table>
	</body>
</html>